package com.tiger.project.domain.req;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tiger.project.domain.AssetReceipt;
import com.tiger.project.domain.AssetReceiptAllocation;
import com.tiger.project.domain.ContractBill;
import com.tiger.project.domain.ContractSponsor;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @Author bai
 * Date on 2022/10/9  16:22
 * Description:租金分配
 */
@Data
public class AssetReceiptAllocations {

    @ApiModelProperty(value = "合同信息")
    private List<ContractSponsor> sponsorList = new ArrayList<>();

    @ApiModelProperty(value = "账单信息")
    private List<ContractBill> billList = new ArrayList<>();

    @ApiModelProperty(value = "累计应付金额")
    private BigDecimal countMoney;

    @ApiModelProperty(value = "累计已付金额")
    private BigDecimal totalAccount;

    @ApiModelProperty(value = "总未分配金额")
    private BigDecimal undividedProfit;

    @ApiModelProperty(value = "本期减免 本期减免总和")
    private BigDecimal derate;

    @ApiModelProperty(value = "本期实收金额  本期增加收款总和")
    private BigDecimal moneyReceived;

    @ApiModelProperty(value = "账期开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date rentStateTime;

    @ApiModelProperty(value = "账期结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date rentEndTime;

    @ApiModelProperty(value = "本期应收金额")
    private BigDecimal currentIncome;


    /**
     * 本期差额 = 本期应收-本期实收-本期减免
     */
    @ApiModelProperty(value = "本期差额")
    private BigDecimal differenceMoney;

    @ApiModelProperty(value = "本期到账")
    private BigDecimal currentIncomeRecord;

    @ApiModelProperty(value = "收款信息")
    private List<AssetReceiptAllocation> allocationList = new ArrayList<>();


}
